package com.example.demo.mapper;

import com.example.demo.domain.UserAccount;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface LoginMapper {

    @Select("select * from user_account where orgid=#{orgid}")
    UserAccount getAccount(Integer orgid);

    @Update("update budget_account set password=#{newPassword} where orgid=#{orgid} ")
    int editPassword(@Param("orgid") Integer orgid, @Param("newPassword")String newPassword);

    @Select("select * from user_account where orgid != 1001")
    List<UserAccount> listOrg();
}
